FWK.extend(FWK,{
	/**
	 * FWK.getScreen() 返回屏幕宽和高
	 */
	getScreen : function(){
		return {
			width:(document.documentElement.scrollWidth>document.documentElement.clientWidth?document.documentElement.scrollWidth:document.documentElement.clientWidth) + "px",
			height:(document.documentElement.scrollHeight>document.documentElement.clientHeight?document.documentElement.scrollHeight:document.documentElement.clientHeight) + "px"
		}
	},
	/**
	 * 获取鼠标坐标
	 * @param {Event} ev 鼠标事件
	 */
	getMsCoord : function (ev){
		ev = ev || window.event;
		if(ev.pageX || ev.pageY){
			return {x:ev.pageX, y:ev.pageY};
		}
		return {
			x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
			y:ev.clientY + document.body.scrollTop  - document.body.clientTop
		}
	},
	/**
	 * 获取Dom元素坐标
	 * @param {Object} elm Dom元素引用
	 */
	getDomCoord : function(elm){
		var left = 0;
		var top  = 0;
		var width = elm.offsetWidth;
		var height = elm.offsetHeight;
	
		while (elm.offsetParent){
			left += elm.offsetLeft;
			top  += elm.offsetTop;
			left -= elm.scrollLeft;
			top  -= elm.scrollTop;
			elm   = elm.offsetParent;
		}
	
		left += elm.offsetLeft;
		top  += elm.offsetTop;
		return {left:left, top:top,x:left, y:top, w:width, h:height};
	}
});